SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS OFF
GO

/*
----------------------------------------------------------------------------------------------------

-- Created By:  ()
-- Purpose: Inserts a record into the Faq table
----------------------------------------------------------------------------------------------------
*/


CREATE PROCEDURE dbo.Faq_Insert
(

	@Id int    OUTPUT,

	@FullName nvarchar (100)  ,

	@Email nvarchar (50)  ,

	@Title nvarchar (50)  ,

	@Question nvarchar (500)  ,

	@Answer nvarchar (500)  ,

	@IsPublished bit   ,

	@ClientIp nvarchar (20)  ,

	@IsHot bit   ,

	@OrderIndex int   ,

	@AnsweredDate datetime   ,

	@AnsweredUser varchar (50)  ,

	@CreatedDate datetime   ,

	@UpdatedDate datetime   
)
AS


				
				INSERT INTO [dbo].[Faq]
					(
					[FullName]
					,[Email]
					,[Title]
					,[Question]
					,[Answer]
					,[IsPublished]
					,[ClientIp]
					,[IsHot]
					,[OrderIndex]
					,[AnsweredDate]
					,[AnsweredUser]
					,[CreatedDate]
					,[UpdatedDate]
					)
				VALUES
					(
					@FullName
					,@Email
					,@Title
					,@Question
					,@Answer
					,@IsPublished
					,@ClientIp
					,@IsHot
					,@OrderIndex
					,@AnsweredDate
					,@AnsweredUser
					,@CreatedDate
					,@UpdatedDate
					)
				
				-- Get the identity value
				SET @Id = SCOPE_IDENTITY()
									
							
			

GO
